﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 沙鹿便签.Model;

namespace 沙鹿便签.Binding
{
    class TaskCollection
    {
        public ObservableCollection<CTask> Items { get; private set; }
        public TaskCollection()
        {
            Items = new ObservableCollection<CTask>();
        }
        public void LoadData(CTask[] tasks)
        {
            Items.Clear();
            foreach (CTask task in tasks)
            {
                Items.Add(task);
            }
        }
        public void Add(CTask task)
        {
            Items.Insert(0, task);
            
        }
    }
}
